<template>
  <div>
    <el-button>{{ name }}</el-button>
  </div>
</template>

<script>
// eslint-disable-next-line no-unused-vars
const NAME = "x-button";
export default {
  data() {
    return {}
  },
  name:NAME,
  props:{
    name:{
      type:String
    },
    clickFun:{
      type:Function
    },
    option: {
      type: Object,
      default: function (){
        return {
          "form": {
            "inline": false,
            "labelPosition": "right",
            "size": "mini",
            "labelWidth": "125px",
            "hideRequiredAsterisk": false,
            "showMessage": true,
            "inlineMessage": false
          },
          "submitBtn": false,
          "resetBtn": false
        }
      }
    },
  },
  methods:{
    clickFun(f1,data,f2){
      let _this = this
      f1(data).then(res=>{
        f2(_this,res)
      })
    }
  }
}

</script>

<style scoped>

</style>